using Publicuse.Entity.AttributeUtil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Publicuse.Entity
{

  /// <summary>
  /// 系统数据管理
  /// </summary>
  public class Databasemanagement
  {
    [Remark("表名")]
    public string tableName { get; set; }

    [Remark("表描述")]
    public string tableRemark { get; set; }

    [Remark("字段名")]
    public string fileName { get; set; }

    [Remark("字段描述")]
    public string fileRemark { get; set; }

    [Remark("字段类型")]
    public string fileType { get; set; }

    [Remark("主键")]
    public string primaryKeyName { get; set; }

    [Remark("外键")]
    public string foreignKeyName { get; set; }

    [Remark("索引")]
    public string Indexes { get; set; }

    [Remark("外键表名称")]
    public string foreignKeyNameTable { get; set; }

    [Remark("外键表字段")]
    public string foreignKeyNameTablefile { get; set; }

    [Remark("唯一约束")]
    public string uniqueConstraintName { get; set; }

    [Remark("是否为空")]
    public string isnull { get; set; }

    [Remark("默认值")]
    public string defaultvalue { get; set; }

    [Remark("当前数据增量")]
    public int autoIndex { get; set; }

    [Remark("表原字段名")]
    public string fileNameb { get; set; }

    [Remark("表原字段类型")]
    public string fileTypeb { get; set; }

    [Remark("当前操作用户")]
    [NoQuery]
    public string loginUserCode { get; set; }

    [Remark("列名称")]
    public string label { get; set; }

    [Remark("列说明")]
    public string placeholder { get; set; }

    [Remark("列类型")]
    public int type { get; set; }

    [Remark("必填")]
    public int requiredfile { get; set; }

    [Remark("下拉选择框显示内容")]
    public string selecttext { get; set; }

    [Remark("下拉选择框绑定值")]
    public string selectvalue { get; set; }

    [Remark("正则表达式")]
    public string pattern { get; set; }

    [Remark("正则表达式校验描述")]
    public string patterndes { get; set; }

    [Remark("字段长度描述")]
    public string filelendes { get; set; }

    [Remark("最小值")]
    public string min { get; set; }

    [Remark("最大值")]
    public string max { get; set; }

    [Remark("表里所存多少行数据")]
    public long tablerows { get; set; }

    [Remark("是否有历史代码生成模板")]
    public bool templatestr { get; set; } = false;

    [Remark("历史代码生成模板内容")]
    public string templatestrcontent { get; set; }
  }

  public class DatabasemanagementModel
  {
    public string tabledesc { get; set; }

    public string tablename { get; set; }
  }

  /// <summary>
  /// 索引信息
  /// </summary>
  public class DatabasemanagementIndexs
  {
    public string table { get; set; }

    public string non_unique { get; set; }

    public string key_name { get; set; }

    public string column_name { get; set; }
  }

  /// <summary>
  /// 系统数据管理查询参数
  /// </summary>
  public class DatabasemanagementQuery : CommonQuery
  {
    public string tablename { get; set; }

    public DatabasemanagementQuery()
    {
      this.exportName = GetExportRemark;
    }
    public static string GetExportRemark
    {
      get { return "databasemanagement"; }
    }
  }
}
